<template>
  <el-container>
    <el-header>
      <div>
        <breadcrumb>

        </breadcrumb>

      </div>
    </el-header>
    <el-main style="background-color: white ; width: 1100px ; height: 800px; margin: 0 auto">
      <el-card style="padding: 0px ; margin: 0px">

        <el-row style="margin: 0px ; padding: 0px">
          <el-col span="2" style="margin: 0px ; padding: 0px ">
            <p style="margin: 0px; line-height: 40px">文章标题:</p>
          </el-col>
          <el-col span="8">
            <el-input
              placeholder="请输入内容"
              v-model="inpuit101"
              clearable>
            </el-input>
          </el-col>
        </el-row>
        <div style="margin-top: 20px"></div>
        <el-row style="margin: 0px ; padding: 0px">
          <el-col span="2" style="margin: 0px ; padding: 0px ">
            <p style="margin: 0px; line-height: 40px">文章分类:</p>
          </el-col>
          <el-col span="8">
            <template>
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </template>
          </el-col>
        </el-row>

        <div style="margin-top: 20px"></div>
        <el-row style="margin: 0px ; padding: 0px">
          <el-col span="2" style="margin: 0px ; padding: 0px ">
            <p style="margin: 0px; line-height: 40px">显示设置:</p>
          </el-col>
          <el-col span="8" style="margin-left: 20px; margin-top: 10px">

            <el-tooltip :content="'Switch value: ' + value5" placement="top">
              <el-switch
                v-model="value5"
                active-color="#13ce66"
                inactive-color="#ff4949"
                active-value="100"
                inactive-value="0">
              </el-switch>
            </el-tooltip>

          </el-col>
        </el-row>

        <div style="margin-top: 20px"></div>

        <el-row>
          <!--          <Editor v-model:value="text"  v-model="textarea" :height="heightone"></Editor>-->
          <el-input v-model="text" type="textarea"></el-input>

        </el-row>
        <div style="margin-top: 20px"></div>
        <el-row>
          <el-col push="10">
            <el-button type="primary" plain @click="insert">提交</el-button>
          </el-col>
        </el-row>
      </el-card>
    </el-main>
  </el-container>

</template>

<script>
import Log from "@/views/monitor/job/log";

import breadcrumb from "@/components/Breadcrumb"
import Editor from "@/components/Editor"
import {selectAcceptOrder} from '@/api/help/helpSand'
import log from "@/views/monitor/job/log";

export default {

  components: {breadcrumb, Editor}


  , data() {

    return {
      value1: true,
      value2: true,
      inpuit101: '',
      value5: '100',
      text: '',
      heightone: 300,
      options: [{
        value: '1',
        label: '技术问提'
      }, {
        value: '2',
        label: '传销问题'
      }, {
        value: '3',
        label: '老板不给工资问题'
      }, {
        value: '4',
        label: '心情不好想亚尔哦问题'
      }, {
        value: '5',
        label: 'lol问题'
      }],
      value: '',
      // 表单参数
      form: {
        qtTitle: "", //标题
        qtType: "", // 分类
        isDeleted: "", //是否显示
        describe: "" //文本分类
      },
    };
  },

  methods: {
    insert() {
      this.form.qtTitle = this.inpuit101
      this.form.qtType = this.value
      this.form.isDeleted = this.value5
      this.form.describe = this.text
      selectAcceptOrder(this.form).then(res => {
          if (res.code == 200){
            alert("提交成功");
          }
      })
    },
  }

}

</script>
